/*
 * @Descripttion:
 * @version:
 * @Author: HuA
 * @Date: 2022-10-12 15:36:01
 * @LastEditors: HuA
 * @LastEditTime: 2022-10-12 20:10:20
 */
import { queryApply } from '@/api/certification'

export default {
  namespaced: true,
  state: {
    // 声明数据
    applys: []
  },
  mutations: {
    // 声明申请突变
    SET_APPLY(state, payload) {
      state.applys = payload
    }
  },
  actions: {
    // 查询所有申请
    async queryApplys({ commit }, params) {
      const res = await queryApply(params)
      // console.log(res); // res.data.list[]是我们需要的数组
      commit('SET_APPLY', res.data.list)
    }
  }
}
